-- operation template
-- sıralı bir şekilde yürürlük betiğinin oluşturulması

local yur_content=[==[
#!/bin/sh
# generated by mpsd version 2.0 alfa
@GENTIME@

# TALIMAT FILE SHA256SUM
thash="@THASH@"

TALIMAT_DIZIN="@TALIMAT_DIZIN@"

# IMPORTS
#[ ! -f ./mpsd-helper.sh ] && exit 1;
#source ./mpsd-helper.sh
@FUNCTIONS@

# GLOBAL VARIABLES"
#==========================================
@GLOBALS@
#==========================================

# TALIMAT VARIABLES
#==========================================
tanim="@TANIM@"
url=@URL@
paketci="@PAKETCI@"
grup="@GRUP@"
isim=@ISIM@
surum=@SURUM@
devir=@DEVIR@
#==========================================

# SOURCES
#==========================================
kaynak=(@KAYNAK@)
#==========================================

# FUNCTIONS
#==========================================

#_install_bdeps(){
#echo "GEREKLERIN KURULUMU = ${isim}-${surum}-${devir}"
#echo "======================================================="
#@GEREK_KUR@
#echo "======================================================="
#}

_download_copy(){
echo "KAYNAK İNDİRME-KOPYALAMA = ${isim}-${surum}-${devir}"
echo "======================================================="
@DOWNLOAD@
[ $? -eq 1 ] && hata_olustu "--exit---"
echo "======================================================="
}

_hash_check(){
echo "KAYNAK HASH KONTROL = ${isim}-${surum}-${devir}"
echo "======================================================="
@HASH_CHECK@
echo "======================================================="
}

_extract(){
echo "DIŞARI ÇIKARMA = ${isim}-${surum}-${devir}"
echo "---------"
time_start
echo "======================================================="
rm -f $SRC/arsiv.list
@EXTRACT@
echo "======================================================="
time_finish
echo "======================================================="
}

_build(){
[ ! -d $SRC ] && hata_olustu "$SRC dizin mevcut değil!"
echo "DERLEME = ${isim}-${surum}-${devir}"
echo "---------"
time_start
echo "======================================================="
trap 'hata_olustu "derleme hata/building step error"' ERR
cd $SRC
set -x
[ -d ${isim}-${surum} ] && cd $SRC/${isim}-${surum}
@DERLE@
set +x
echo "======================================================="
time_finish
echo "======================================================="
}

_install(){
[ ! -d $PKG ] && hata_olustu "$PKG dizin mevcut değil!"
echo "PAKETLEME = ${isim}-${surum}-${devir}"
echo "---------"
time_start
echo "======================================================="
trap 'hata_olustu "pakur hata/installing step error"' ERR
cd $SRC
set -x
[ -d ${isim}-${surum} ] && cd $SRC/${isim}-${surum}
@PAKUR@
set +x
echo "======================================================="
time_finish
echo "======================================================="
}

# LOG FILES
BUILD_LOG=/tmp/$isim-$surum-$devir.build.log
INSTALL_LOG=/tmp/$isim-$surum-$devir.install.log
_LOG=/tmp/$isim-$surum-$devir.log

run $1

]==]

return yur_content;
